//
//  homotopy.hpp
//  EMT_V7_LSAP_Guess
//
//  Created by Duong Ngo on 7/4/17.
//  Copyright © 2017 Duong Ngo. All rights reserved.
//

#ifndef homotopy_hpp
#define homotopy_hpp

#include <stdio.h>
#include "global.hpp"

/** Store output during the homotopy process */
void store_output_homotopy (const std::vector<double>& result, const double& chi, const std::string& file_name);

/** General homotopy process */
void conduct_homotopy (const std::vector<double>& kappa_start, const std::vector<double>& kappa_end, const std::vector<double>& x_start, const std::vector<double>& x_end,  const std::vector<double>& rn_start, const std::vector<double>& rn_end, const std::vector<double>& ss, const std::string& file_name, std::vector<double>& x_init);

/** Homotopy from steady state to homo_kappa*/
void homotopy_from_ss_to_homo_kappa (const std::vector<double>& ss, std::vector<double>& kappa_start, std::vector<double>& kappa_end, std::vector<double>& x_start, std::vector<double>& x_end,  std::vector<double>& rn_start, std::vector<double>& rn_end,  std::vector<double>& x_init);

/** Homotopy from homo_kappa to kappa */
void homotopy_from_homo_kappa_to_kappa (const std::vector<double>& ss, std::vector<double>& kappa_start, std::vector<double>& kappa_end, std::vector<double>& x_start, std::vector<double>& x_end,  std::vector<double>& rn_start, std::vector<double>& rn_end,  std::vector<double>& x_init);

/** After "T_zero" periods, the central bank raise "Rn" to 1./betab */
void homotopy_for_vec_rn (const int& T_zero, const std::vector<double>& ss, std::vector<double>& kappa_start, std::vector<double>& kappa_end, std::vector<double>& x_start, std::vector<double>& x_end,  std::vector<double>& rn_start, std::vector<double>& rn_end,  std::vector<double>& x_init);



#endif /* homotopy_hpp */









